﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using WebApplication1.Models;
using WebApplication1.Swagger;

namespace WebApplication1.Controllers
{
    /// <summary>
    /// 公共模块
    /// </summary>
    [ApiExplorerSettings(GroupName = SwaggerGroupingModel.GROUPNAME_COMM)]
    public class CommController : Controller
    {

        /// <summary>
        /// POST请求测试(无参数)
        /// </summary>
        /// <returns></returns>
        [HttpPost("CommPost")]
        public void CommPost()
        {

        }

        /// <summary>
        /// POST请求测试(传参数需要添加[FromBody])
        /// </summary>
        /// <returns></returns>
        [HttpPost("CommPostPra")]
        public PostRequstTestDto CommPostPra([FromBody]PostRequstTestDto pra)
        {
            return pra;
        }

        /// <summary>
        /// POST请求测试(无参数)
        /// </summary>
        /// <returns></returns>
        [HttpGet("CommGet")]
        public void CommGet()
        {

        }

        /// <summary>
        /// Put请求测试
        /// </summary>
        /// <returns></returns>
        [HttpPut("CommPut")]
        public void CommPut()
        {

        }

        /// <summary>
        /// Delete请求测试
        /// </summary>
        /// <returns></returns>
        [HttpDelete("CommDelete")]
        public void CommDelete()
        {

        }
    }
}
